ci: replace invalid osv-scanner severity flags#9333
Merged
Conversation
osv-scanner v2.3.8 has no --severity flag, so #9331 broke the audit step with 'flag provided but not defined: -severity'. Replace it with a JSON output scan plus a composite-action gate that fails only on findings with CVSS >= 7.0 (HIGH/CRITICAL), which is what #9331 intended. Medium/low findings are logged as warnings and no longer block releases. TICKET: VL-7134 TICKET: VL-7134
Contributor
davidkaplanbitgo
approved these changes
Jul 22, 2026
zahin-mohammad
approved these changes
Jul 22, 2026
zahin-mohammad
left a comment
Contributor
There was a problem hiding this comment.
Approve — correct, well-structured hotfix. #9331's --severity=HIGH/CRITICAL isn't a valid v2.3.8 scan flag, so the audit step has been erroring (no continue-on-error) and breaking every release/publish since it merged. This restores the gate.
Verified:
--severityis not a v2.3.8 scan flag (only--min-severityonfix);--format json/--output-fileare correct.groups[].max_severityexists (results.go:301) — jq path is right; CVSS ≥ 7.0 == HIGH+CRITICAL matches intent.- The pinned action forwards
scan-argsverbatim, no injected format/output flags. - Fail-closed on scan errors (invalid/missing JSON → exit 1); working tree cleaned via
rm -f.
Non-blocking:
- Fail-open on unscored advisories: by construction, any advisory with empty
max_severity(no CVSS vector) can't block — warning only. Pre-#9331 blocked on any finding, so an unscored-but-severe advisory that used to block now passes. Intended direction, but worth a conscious sign-off. - Release/publish-only path is untestable in PR CI — recommend a
workflow_dispatchdry-run before the next real release relies on it. - Trivial: hardcoded
WCN-1550in the warning string will go stale; commit/PR body repeatsTICKET: VL-7134.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
osv-scanner v2.3.8 has no --severity flag, so #9331 broke the audit step with 'flag provided but not defined: -severity'. Replace it with a JSON output scan plus a composite-action gate that fails only on findings with CVSS >= 7.0 (HIGH/CRITICAL), which is what #9331 intended. Medium/low findings are logged as warnings and no longer block releases.
TICKET: VL-7134
TICKET: VL-7134